<?php
// no direct access
defined ( '_JEXEC' ) or die ( 'Restricted access' ); 

$hideInfoBlock = true;

if (!$this->isIE() || $this->isRTL()) return;
//$this->addJS ('js/curvycorners.src.js');
$mode = 0;
if (JRequest::getCmd ('option') == 'com_community' && (in_array(JRequest::getCmd ('view'), array('photos', 'videos'))) ) $mode = 1;
?>
<?php if ($mode == 0): ?>
<script type="text/javascript" src="<?php echo JURI::base(true).'/templates/'.$this->template ?>/js/DD_roundies_0.0.2a-min.js"></script>
<script type="text/JavaScript">

	DD_roundies.removeRule = function (selector) {
		if (!DD_roundies.styleSheet) return;
		var selectors = selector.split(',');
		for (var i=0; i<selectors.length; i++) {
		DD_roundies.addRule (selectors[i], 'behavior:none');}
	}
	
	function makerounded () {
		DD_roundies.addRule('.ja-slidewrap, .ja-moduleraw-style2', '8px');
		DD_roundies.addRule('#ja-content-main, #ja-container div.ja-moduletable', '8px');

		DD_roundies.addRule('#community-wrap div.greybox, #community-wrap .cModule', '8px');
		DD_roundies.addRule('#community-wrap .cModule h3, #ja-container div.ja-moduletable h3', '8px 8px 0 0');
		DD_roundies.addRule('#community-wrap .cSubmenu, #community-wrap .app-item, #community-wrap .groups-news-row, #community-wrap #group-discussion-topic, #community-wrap #group-buletin-topic, #community-wrap .group-top, #community-wrap .event-top ', '8px');
		DD_roundies.addRule('#community-wrap .app-box', '0 0 8px 8px');

		DD_roundies.addRule('#community-wrap .cMain .cMain-inner', '8px');
		DD_roundies.addRule ('body #community-wrap #cToolbarNav', '8px');
		DD_roundies.addRule('#community-wrap .componentheading', '8px 8px 0 0');
		
		DD_roundies.removeRule ('button#save-status');
	}

	makerounded();	
</script> 

<?php else : ?>

<script type="text/javascript">
var curvyCornersNoAutoScan = true;
</script> 
<script type="text/javascript" src="<?php echo JURI::base(true).'/templates/'.$this->template ?>/js/curvycorners.src.js"></script>
<script type="text/javascript">
var curvyCornersVerbose = false;
</script> 
<script type="text/JavaScript">

	makeround = function (selector, setting) {
		if (!setting || setting=='all') setting = settings_all;
		if (setting=='top') setting = settings_top;
		if (setting=='bottom') setting = settings_bottom;
		$$(selector).each (function(el){curvyCorners(setting, el)});
	}
	
    var settings_all = {
      tl: { radius: 8 },
      tr: { radius: 8 },
      bl: { radius: 8 },
      br: { radius: 8 },
      antiAlias: true
    };
    var settings_top = {
      tl: { radius: 8 },
      tr: { radius: 8 },
      antiAlias: true
    };
    var settings_bottom = {
      bl: { radius: 8 },
      br: { radius: 8 },
      antiAlias: true
    };
	
	//makeround ('.ja-slidewrap');
	//makeround ('#ja-content-main');
	makeround ('div.ja-moduletable');
	makeround ('#community-wrap .app-box');
	makeround ('#community-wrap div.greybox');
	makeround ('#community-wrap .cModule');
	makeround ('#community-wrap .cMain');
	makeround ('#community-wrap .app-box-header', 'top');
	makeround ('#community-wrap .cModule h3', 'top');
	makeround ('#community-wrap .componentheading', 'top');
	makeround ('div.ja-moduletable h3', 'top');
	makeround ('#community-wrap #miniheader');
	makeround ('div#community-wrap #photoupload-container div.upload-form, #community-wrap .cSubmenu');
	makeround ('body #community-wrap #cToolbarNav');
</script> 

<?php endif; ?>